﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPMN.Domain.Entity.User
{
    /// <summary>
    /// 用户表
    /// </summary>
    [Table("UserInfo")]
    public class UserInfo : Audit
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        [Key]
        public int UserId { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        ///头像
        /// </summary>
        public string HeadImageUrl { get; set; } = "暂无";

        /// <summary>
        /// 密码
        /// </summary>
        public string Pwd { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string Tel { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 密码错误次数
        /// </summary>
        public int ErrorCount { get; set; } = 0;
        /// <summary>
        /// 注册时间
        /// </summary>
        public DateTime  UserDate { get; set; } = DateTime.Now;
        public UserInfo()
        {
            
        }
        public UserInfo(string userName, string pwd, string name, string tel, string email, int ErrorCount)
        {
            UserName = userName;
            Pwd = pwd;
            Name = name;
            Tel = tel;
            Email = email;
        }
    }
}
